package com.dynaBlaster.plainTest;

import junit.framework.TestCase;
import com.dynaBlaster.*;
import com.dynaBlaster.core.Point;


public class PointTest extends TestCase {
	
	public void testPointEq()
	{
		assertTrue((new Point(-2,-3)).eq(new Point(-2,-3)));
		assertFalse((new Point(-2,-3)).eq(new Point(-3,-2)));
	}
	
	
	public void testPointSub()
	{
		Point p = (new Point(9,-3)).sub(new Point(-1,2));
		
		assertEquals(p.x, 10);
		assertEquals(p.y, -5);		
	}
	
	public void testPointDefaultConstructor()
	{
		Point p = new Point();
		
		assertEquals(p.x, 0);
		assertEquals(p.y, 0);
	}
	

	public void testPointConstructor()
	{
		Point p = new Point(8,11);
		
		assertEquals(p.x, 8);
		assertEquals(p.y, 11);
	}

}
